<?php

class WrOthersPeer extends BaseWrOthersPeer
{
  public static function getBySynopsis($synopsis)
  {
    $conn = Propel::getConnection();
    $query = 'SELECT m.name, b.date1, i.status comment, i.hour
      FROM wr_basic b, %s i, wr_member m
      WHERE i.synopsis = "%s"
      AND i.basic_id = b.id
      AND b.member_id = m.id order by b.date1 asc';
    $query = sprintf($query, WrOthersPeer::TABLE_NAME, $synopsis);
    $stmt = $conn->prepare($query);
    $stmt->execute();
    $issues = $stmt->fetchAll(PDO::FETCH_ASSOC);
    return $issues;
    
  }
}
